<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "ql_campaign_cn".
 *
 * @property int $id
 * @property string $campaign_id campaign_id
 */
class QlCampaignCn extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'ql_campaign_cn';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['campaign_id'], 'string', 'max' => 50],
            [['campaign_id'], 'unique'],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'campaign_id' => Yii::t('app', 'campaign_id'),
        ];
    }

    /**
     * @return \yii\db\Connection the database connection used by this AR class.
     */
    public static function getDb()
    {
        return Yii::$app->get('db_vikoc');
    }

}
